#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
@__author:gaoxiaojun
'''
import yaml, os

def jionPath(file='myConfig.yaml'):

    return os.path.join(os.path.dirname(os.path.realpath(__file__)), file).replace("\\", "/")
def getDerverPath(driverName):
    fileName ='myConfig.yaml'
    with open( jionPath(fileName),encoding='utf-8' ) as f:
        data = yaml.safe_load(f)
        if driverName in data.get('house'):
            return jionPath(data.get('house').get(driverName))


if __name__ == '__main__':
    aa = getDerverPath("geckodriver")
    print(aa)